//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { Wechatopen, WechatopenResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooWechatopenList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<WechatopenResponse>(`/uctoo/wechatopen/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooWechatopen = async (id: string) => {
  return requestClient.get<Wechatopen>(`/uctoo/wechatopen/${id}`);
};

export const adductooWechatopen = async (data: Partial<Wechatopen>) => {
  return requestClient.post<Wechatopen>('/uctoo/wechatopen/add', data);
};

export const edituctooWechatopen = async (data: Partial<Wechatopen>) => {
  return requestClient.post<Wechatopen>('/uctoo/wechatopen/edit', data);
};

export const deleteuctooWechatopen = async (id: string) => {
  return requestClient.post<any>('/uctoo/wechatopen/del', { id });
};
